<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <title>Log4Server</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8"/> 
        <link rel="stylesheet" type="text/css" href="/media/css/base.css" />

</head>
<body>
<h1>{% block title %}Log Status Page{% endblock %}</h1>

    {% block registeredlogs %}
    <h2> Registered logs </h2>
    <table class="registered_logs">
        <tr>
            <th>Servers</th>
            <th>Logs</th>
        </tr>
    {% for log in logs %}
    <tr class="logs">
            <td>{{ log.logserver }}</td>
            <td>{{ log.logpath }}</td>
        </tr>
    {% endfor %}
    </table>
    {% endblock %}

    <br></br>
    
    {% block pagination_headers %}
    {% endblock %}
    
    <p></p>

    {% block pagination %}
        <div class="pagination">
            {% if logtraces.number >= 5 %}
                <a href="?page=1">First</a>
            {% endif %}
            <span class="step-links">
                {% if logtraces.has_previous %}
                <a href="?page={{ logtraces.previous_page_number }}">&lt</a>&nbsp;
                {% endif %}
                <span class="current">
                    {% for page in pages_iter %}
                        {% if logtraces.number != page %}
                            <a href="?page={{ page }}">{{ page }}</a>
                        {% else %}
                <font size="+2" color="#2B3E42">{{ logtraces.number }}</font>                       
                        {% endif %}
                    {% endfor %}
                </span>
                {% if logtraces.has_next %}
                   &nbsp<a href="?page={{ logtraces.next_page_number }}">&gt</a>
                {% endif %}
            </span>
            {% if logtraces.number < logtraces.paginator.num_pages %}
                <a href="?page={{ logtraces.paginator.num_pages }}">Last</a>
            {% endif %}
            Page {{ logtraces.number }} of {{ logtraces.paginator.num_pages }}
        <table class="logtraces">
            <tr>
                <th>LogTrace</th>
                <th>Time triggered</th>
                <th>Log</th>
                <th>Log Server</th>
            </tr>
        {% for logtrace in logtraces.object_list %}
            <tr bgcolor="{{ logtrace.color }}">
                <td>{{ logtrace }}</td>
                <td>{{ logtrace.insertion_date }}</td>
                <td>{{ logtrace.log.logpath }}</td>
                <td>{{ logtrace.log.logserver }}</td>
            </tr>
        {% endfor %}
        </table>
        </div>
        {% endblock %}
	</body>
<html>
